<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script src="./index.js"></script>
<script>
	// 更改状态的函数进行抽离
	const p = new Promise(function(resolve,reject){
		// reject(2);// 将状态变为rejected,值为2
		// resolve(1);// 将状态变为fulfilled,值为1
		throw "异常";
	});
	console.log(p);
</script>

</html>